package com.wpw.dream.thread;

import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class PriorityThreadPoolDemo {

	public static void main(String[] args) {
		ThreadPoolExecutor executor = new ThreadPoolExecutor(2, 2, 1, TimeUnit.SECONDS,
				new PriorityBlockingQueue<Runnable>());
		for (int i=0; i<4; i++){
			executor.execute(new Runnable() {
				
				@Override
				public void run() {
					
				}
			});
			}
	}

}
